import {request} from "./request.js"

export function newContract(data) {
	return request({
		url: '/api/contract/',
		method: 'post',
		data: data
	})
}

export function getContractList() {
	return request({
		url: '/api/contract/',
		method: 'get',
		data: {
			
		}
	})
}

export function getMyContractList() {
	return request({
		url: '/api/contract/mycontract/',
		method: 'get',
		data: {
			
		}
	})
}

export function updateContract({
	contract_num,
	email,
	first_name,
	last_name,
	fee,
	total_tib,
	start_date,
	fund_date,
	is_active,
	id
}) {
	return request({
		url: `/api/contract/${id}`,
		method: 'put',
		data: {
			contract_num,
			email,
			first_name,
			last_name,
			fee,
			total_tib,
			start_date,
			fund_date,
			is_active
		}
	})
}
